<template>
  <el-dialog
  :close-on-click-modal="false"
  modal-append-to-body lock-scroll top="30%"
  @close="initAuthCode"
  :show-close="false"
  class= "dislog-login dislog-phone"
  :visible.sync="isShow">
      <qrcode :value="content" :options="{ size: 200 }"></qrcode>
  </el-dialog>
</template>

<script>
  import VueQrcode from '@xkeshi/vue-qrcode'
  export default {
    name: 'QrCode',
    data () {
      return {
        paying: ''
      }
    },
    props: {
      content: {
        type: String,
        default: ''
      }
    },
    computed: {
      isShow () {
        return !!this.content
      }
    },
    components: {
      qrcode: VueQrcode
    },
    methods: {
      checkPaymentDone () {
        // this.dispatch('', data)
        // .then( resp => {

        // })
      }
    },
    mounted () {
      setInterval
      const timeId = setInterval(() => {
        if (this.paying === 'success') {
          clearInterval(timeId)
        } this.checkPaymentDone()
      }, 3000)
    }
  }
</script>

<style scoped>

</style>
